from django.contrib import admin

from blog import models
# Register your models here.

# 自定制展示
# class BookAdmin(admin.ModelAdmin):
#     list_display =('id','title','publishDate','price')
#     List_editable =('title','publishDate','price')
#     filter_horizational=('author','Publish')
#     # 选择项可搜索、自动添加
#     list_per_page=3
#     # 每页展示条数
#     search_fields=('id','name','publish__name')
#     # 搜索
#     list_filter=('publishDate','publish')
#     # 过滤
#     ordering =('price','id')
#     # 排序‘-price’ 降序,'id' 第二排序
#
#
# admin.site.register(models.Book,BookAdmin)
#
# admin.site.register(models.Publishs)